﻿using Abp.Domain.Entities.Auditing;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Camc.Quality.ProductionPlan
{
    /// <summary>
    /// 生产准备计划
    /// </summary>
    public class ProductionAssignment : FullAuditedEntity<Guid>
    {
        public const int MaxMessageLength = 4 * 1024; //4KB

        /// <summary>
        /// 生产准备计划编号
        /// </summary>
        public string   PlanNumber { get; set; }
        /// <summary>
        /// 规格型号
        /// </summary>
        public string Model { get; set; }
        /// <summary>
        /// 发次
        /// </summary>
        public string LotNo { get; set; }

        /// <summary>
        /// 型号Id
        /// </summary>
        public Guid? ModelId { get; set; }
        /// <summary>
        /// 发次Id
        /// </summary>
        public Guid? LotNoId { get; set; }
        /// <summary>
        /// 产品图号
        /// </summary>
        public string DrawingNo { get; set; }

        /// <summary>
        /// 任务编号
        /// </summary>
        public string JobNumber { get; set; }
        /// <summary>
        /// 计划完成日期
        /// </summary>
        public DateTime CompletionDate { get; set; }
        /// <summary>
        /// 任务名称
        /// </summary>
        public string ProductName { get; set; }

        /// <summary>
        /// 准备内容
        /// </summary>
        [StringLength(MaxMessageLength)]
        public string PreparationRemark { get; set; }
        /// <summary>
        /// 班组id
        /// </summary>
        public string OrganizationUnitId { get; set; }
        /// <summary>
        /// 班组id描述
        /// </summary>
        public string OrganizationUnitDesc { get; set; }

        /// <summary>
        /// 负责人Id支持多人
        /// </summary>
        public string UserId { get; set; }

        /// <summary>
        /// 负责人Id支持多人描述
        /// </summary>
        public string UserName { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        public string AssignmentAuthor { get; set; }
        /// <summary>
        /// 编制时间
        /// </summary>
        public string AssignmentTime { get; set; }

        /// <summary>
        /// 开始日期
        /// </summary>
        public string StartTime { get; set; }
        /// <summary>
        /// 结束日期
        /// </summary>
        public string EndTime { get; set; }
        /// <summary>
        /// 任务状态
        /// </summary>
        public AssignmentTypes AssignmentTypes { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        [StringLength(MaxMessageLength)]
        public string Remark { get; set; }

    }
}
